package com.rykj.qxj.server.model.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;


@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name="metadata_basic")
public class MetadataBasic {
    @Id
    @GeneratedValue
    private  int id;
    @ApiModelProperty(value = "数据库类型")
    private String  databaseType;
    @ApiModelProperty(value = "数据分类")
    private String  classification;
    @ApiModelProperty(value = "数据目录")
    private String  directory;
    @ApiModelProperty(value = "所属数据库")
    @NotNull
    private String  belongDatabase;
    @Pattern(regexp = "^[a-zA-Z][a-zA-Z0-9_]{1,50}$",message = "表名只能是英文下划线")
    @ApiModelProperty(value = "表名")
    private String  tableName;
    @ApiModelProperty(value = "表注释")
    private String  tableNotes;
    @ApiModelProperty(value = "建表sql语句")
    private String  tableBuildStatement;
    @ApiModelProperty(value = "建表类型，可视化建表或sql建表")
    private String  createType;
    @ApiModelProperty(value = "删除状态,normal:正常;delete:删除")
    private String  status;
    @ApiModelProperty(value = "创建人")
    private String  createdBy;
    @ApiModelProperty(value = "创建时间")
    private Date  createdTime;
    @ApiModelProperty(value = "修改人")
    private String  updatedBy;
    @ApiModelProperty(value = "修改时间")
    private Date  updateTime;


}
